#!/bin/bash

# 默认环境为 dev
ENV=${1:-dev}

# 设置环境变量并运行 Air
case $ENV in
  dev)
    echo "Running in development environment"
    export GO_ENV=dev
    air -c .air.conf
    ;;
  uat)
    echo "Running in UAT environment"
    export GO_ENV=uat
    air -c .air.conf
    ;;
  prd)
    echo "Running in production environment"
    export GO_ENV=prd
    air -c .air.conf
    ;;
  *)
    echo "Unknown environment: $ENV"
    exit 1
    ;;
esac
